<template>
<div>
  <el-select v-model="carType" @change="carTypeChange" style="width: 100%" placeholder="请选择车型">
    <span v-for="(val,index) in type" :key="val">
      <el-option :label="index+':'+val" :value="index"/>
    </span>
  </el-select>
</div>
</template>

<script>
export default {
  name: "CarTypeSelect",
  model:{
    prop:'value',
    event: 'childValueChange'
  },
  props:['value'],
  methods:{
    carTypeChange(e) {
      this.$emit('childValueChange',e)
    }
  },
  data() {
    return{
      carType:this.value,
      type:['小型货车','中型货车','大型货车','货运火车']
    }
  }
}
</script>

<style scoped>

</style>
